{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from detecting.config import cfg\n",
    "from detecting.build.fasterrcnn import FasterRCNNModel\n",
    "from detecting.datasets.datasets import load_data_generator\n",
    "from detecting.utils.eval_coco import eval_coco"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 与配置文件中的配置合并\n",
    "cfg.merge_from_file('eval.yml')\n",
    "# 载入模型\n",
    "model = FasterRCNNModel(cfg)\n",
    "# 数据生成器\n",
    "generator = load_data_generator(cfg)\n",
    "# 评估结果\n",
    "eval_coco(model, generator)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
